# @Filename:    sample1
# @Author:      王佳伟
# @Time:        2025-02-25 16:56
# @Describe:    接口监控
import requests

def check_api_status(api_url):
    response = requests.get(api_url)
    if response.status_code == 200:
        print(f"接口{api_url}正常")
    else:
        print(f"接口{api_url}异常")

if __name__ == '__main__':
    api_urls = ['https://www.baidu.com/', 'https://www.csdn.net/']
    for url in api_urls:
        check_api_status(url)
